﻿using System;
using System.Collections.Generic;
using System.Text;
using Xeml.Document.Ontologies;
using Mpi.Common.Collections;
using Xeml.Document.Contracts;

namespace Xeml.Document
{
    public class SimpleOboTermCollection : ObservableIdCollectionBase<SimpleOboTerm, string>, IEnumerable<IOntologyTerm>
    {
        protected override string GetIdentifiere(SimpleOboTerm item)
        {
            return item.TermId;
        }

        protected override void SetOwner(SimpleOboTerm item)
        {
            item.Collection = this;
        }

        protected override void RemoveOwner(SimpleOboTerm item)
        {
            item.Collection = null;
        }

        #region IEnumerable<IMaterialSupervisor> Members

        public new IEnumerator<IOntologyTerm> GetEnumerator()
        {
            return base.GetEnumerator();
        }

        #endregion
    }
}
